//// 						FAMILY SUPPORT AND MIGRATION IN NIGERIA
					
										*Daniel Tuki*
										
* This study is based on survey data collected from the state of Edo in Nigeria in 2021 as part of the Transnational Perspectives on Migration and Integration (TRANSMIT) research project. For more information on the project visit: https://www.projekte.hu-berlin.de/en/transmit


//		DEPENDENT VARIABLES

* Migration aspirations (emiglike): This measures respondents' desire to migrate on a scale from 1 to 5, with higer values denoting higher migration aspirations. 
codebook emiglike 


* Reach Europe (riskeur): This measures respondents assessment of their likelihood of reaching Europe should they decide to migrate there. The variable is measured on a scale from 1 to 5. Higher (lower) values denote a higher (lower) likelihood of reaching Europe. 
codebook riskeur



//		EXPLANATORY VARIABLE

* Family support (famsuppmig): This is a dummy variable that is coded as 1 if a respondent beleives their family would like them to migrate and 0 otherwise.
codebook famsuppmig



//		CONTROL VARIABLES

* Household size (hhold_size): This measures the total number of respondents living under the same roof and who regularly share meals. 
describe n_hh
encode n_hh, gen (hhold_size)


* Know return migrant (netretknow). This is a dummy variable that is coded as 1 if respondents know someone in their community who has travelled abroad and returned, and 0 otherwise. 
codebook netretknow


*Household income (hhecon): This meaures the income of the household to which the respondent belongs on a scale with five ordinal categories.
codebook hhecon


* Education (educ): This meaures the highest level of education attained by respondents on a scale with 10 ordinal categories ranging from "0 = no education" to "9 = master's degree or higher." 
codebook educ
*To treat respondents who don't know their level of education as missing observations:
replace educ = . if educ == -66


* Economic growth (growth): This measures respondents' assessment of Nigeria's economic performance on a scale with five ordinal categories. For easier interpretation of the regression coefficient, I inverted this variable so that higher ordinal values denote better economic performance [Based on the "economy" variable]:
codebook economy
gen growth = 4 - economy


* Married (married): This is a dummy variable that is coded as 1 if a respondent is married or has ever been married, and 0 otherwise. I categorized widows and divorced individuals as married. [Derived from the marstat variable]
codebook marstat
gen married = 1
*To code single people (n = 541) and those in partnerships (n = 1) as unmarried: 
replace married = 0 if marstat == 0 
replace married = 0 if marstat == 1
replace married = . if marstat == . 


* Age (age1): This variable is measured in years. 


* Female (gender1): This variable is coded as 1 for female and 0 for male.



//		INTERACTION TERMS

*Family support x gender (interact_gender): This is an interaction term that multiplies family support with gender. 
gen interact_gender = famsuppmig * gender1

*Family support x married (interact_married): This is an interaction term that multiplies family support with marital status. 
gen interact_married = famsuppmig * married




///						SUMMARY STATISTICS

// Table 1: Descriptive Statistics 

summ emiglike riskeur famsuppmig gender1 married age1 educ hhold_size hhecon growth netretknow




// 						REGRESSION MODELS

//	Table 1: Ordered logit models regressing migration aspirations and perceived migration risk on family support

//	Migration aspirations

* Model 1: Baseline model
ologit emiglike famsuppmig i.ethnic, vce(cluster lga_name)
*To obtain the AIC statistic
estat ic

*Model 2: Adding control variables
ologit emiglike famsuppmig gender1 married age1  educ hhold_size hhecon growth netretknow i.ethnic, vce(cluster lga_name)
*To obtain the AIC statistic
estat ic

*Model 3: Adding interaction terms
ologit emiglike famsuppmig interact_gender interact_married gender1 married age1 hhold_size educ hhecon growth netretknow i.ethnic, vce(cluster lga_name)
*To obtain the AIC statistic
estat ic

//	Reach Europe [Perceived migration risk]

* Model 4: Baseline model
ologit riskeur famsuppmig i.ethnic, vce(cluster lga_name)
*To obtain the AIC statistic
estat ic

*Model 5: Adding control variables
ologit riskeur famsuppmig gender1 married age1 educ hhold_size hhecon growth netretknow i.ethnic, vce(cluster lga_name)
*To obtain the AIC statistic
estat ic

*Model 6: Adding interaction terms
ologit riskeur famsuppmig interact_gender interact_married gender1 married age1 educ hhold_size hhecon growth netretknow i.ethnic, vce(cluster lga_name)
*To obtain the AIC statistic
estat ic



//	Figure 2: Predicted probabilities showing the magnitude of the associations between family support, migration aspirations, and perceived migration risk

*Panel A: Migration aspirations & Family support [Model 1 in Table 2]
ologit emiglike famsuppmig i.ethnic, vce(cluster lga_name)
margins, dydx(famsuppmig)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (famsuppmig_asp, replace)

*Panel A: Migration risk & Family support [Model 4 in Table 2]
ologit riskeur famsuppmig i.ethnic, vce(cluster lga_name)
margins, dydx(famsuppmig)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (famsuppmig_risk, replace)

// To combine the two graphs: 
graph combine famsuppmig_asp  famsuppmig_risk




///					APPENDIX

// Table A1: Preferred migration destination countries among the population in Edo 
tab emiglike_autocountry


// Table A2: Tabulation of educational level
tab educ



